/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Random;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author jonathan
 */
class Config {
    
    public static double mutationRate = 0.011;
    public static int numInputs = 0;
    public static int numOutputs = 0;
    public static int numHiddenLayers = 0;
    public static int numNeuronsPerHiddenLayer = 0;
    
    
    public static Random r = new Random();
    
    static void load(String fileName) {
        //seed the global random number generator
        r.setSeed(System.currentTimeMillis());
        try {
            //read in file
            Scanner fin = new Scanner(new File("config"));
            numInputs=fin.nextInt();
            numOutputs=fin.nextInt();
            numHiddenLayers=fin.nextInt();
            numNeuronsPerHiddenLayer=fin.nextInt();
            
        } catch (FileNotFoundException ex) {
            System.out.println("cannot find file: \"config\"");
            System.exit(-1);
        }
        
    }
}
